﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dal;
using Model;
namespace Bll
{
   public class MenuBll
    {
       MenuDAL dal = new MenuDAL();

       #region 显示购物车
       public List<Menu> Menushow()
       {

           return dal.Menushow();
       
       }
       #endregion

       #region 添加购物车
       /// <summary>
       /// 添加购物车
       /// </summary>
       /// <param name="jia"></param>
       /// <returns></returns>

     
       public int addcar(int CarId, string CarName, string CarPhoto, string CarDescrib, decimal CarPrice, int CarNum, int UserId)
       {

           return dal.addcar(CarId, CarName, CarPhoto, CarDescrib, CarPrice, CarNum, UserId);

       }
       #endregion

       #region 菜单分类
       /// <summary>
       /// 菜单分类
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>

       public List<Menu> menutype(int id)
       {

           return dal.menutype(id);
       }
       #endregion

       #region 根据菜单表MenuId 查找数据
       /// <summary>
       /// 根据菜单表MenuId 查找数据
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       public List<Menu> carshow(int id)
       {
           return dal.carshow(id);
       
       }
       #endregion

       #region 删除菜单信息
       /// <summary>
       /// 删除菜单信息
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       public int delete(int id)
       {
           return dal.delete(id);
       
       }
       #endregion

       #region 菜单添加
       /// <summary>
       /// 菜单添加
       /// </summary>
       /// <param name="n"></param>
       /// <returns></returns>
       public int addMen(Menu n)
       {

           return dal.addMen(n);
       }
       #endregion

       #region 修改菜单
       /// <summary>
       /// 修改菜单
       /// </summary>
       /// <param name="gai"></param>
       /// <returns></returns>


       public int update(string MenuName, string MenuPhoto, string MenuDescrib, string MenuPrice, int MenuId)
       {

           return dal.update(MenuName, MenuPhoto, MenuDescrib, MenuPrice, MenuId);
       }

       #endregion
    }
}
